#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
    int n1, n2, n3, n4, temp, t3, t4, flag = 0;
    scanf("%d %d %d %d", &n1, &n2, &n3, &n4);
    t3 = n3;
    t4 = n4;
    if (n4 > n3)
    {
        temp = n3;
        n3 = n4;
        n4 = temp;
        flag = 1;
    }
    if (n3 >= n2)
    {
        printf("%d-Y %d-Y\n", t3, t4);
        if (n4 < n1)
        {
            if (flag == 1)
            {
                printf("qing 2 zhao gu hao 1\n");
            }
            if (flag == 0)
            {
                printf("qing 1 zhao gu hao 2\n");
            }
        }
        else
        {
            printf("huan ying ru guan\n");
        }
    }
    else if (n3 < n2 && n3 >= n1)
    {
        if (n4 >= n1)
        {
            printf("%d-Y %d-Y\nhuan ying ru guan", t3, t4);
        }
        else
        {
            if (flag == 1)
            {
                printf("%d-N %d-Y\n2: huan ying ru guan", t3, t4);
            }
            else
            {
                printf("%d-Y %d-N\n1: huan ying ru guan", t3, t4);
            }
        }
    }
    else
    {
        printf("%d-N %d-N\nzhang da zai lai ba", t3, t4);
    }
    return 0;
}
